
import { http } from '@/http/http'
import { ContentTypeEnum } from '@/http/tools/enum'

// 主题列表（scope:1强脑 2茶叶）
export function themeList(query) {
  return http.get(
    '/user/study/themeList', 
    query,
    // {
    //   'Content-Type': ContentTypeEnum.FORM_URLENCODED
    // }
  )
} 

// 产品列表
export function productList(query) {
  return http.get(
    '/user/product/lists', 
    query,
    // {
    //   'Content-Type': ContentTypeEnum.FORM_URLENCODED
    // }
  )
} 

// 产品详情（获取图片）
export function productDetail(query) {
  return http.get(
    '/user/product/detail', 
    query,
  )
} 

// 主题详情
export function themeDetail(query) {
  return http.get(
    '/user/study/themeDetail', 
    query,
  )
}

// 上报学习
export function reportStudy(data, options = {}) {
  return http.post(
    '/user/study/reportStudy', 
    data,
    undefined,
    {
      'Content-Type': ContentTypeEnum.FORM_URLENCODED
    },
    options
  )
} 


// 专业知识库
export function knowledgeList(query) {
  return http.get(
    '/user/study/knowledgeList', 
    query,
  )
}


// 产品相关
export function documentList(query) {
  return http.get(
    '/user/study/documentList', 
    query,
  )
}